<?xml version="1.0" encoding="UTF-8"?>
<dxl:DXLMessage xmlns:dxl="http://greenplum.com/dxl/2010/12/">
  <!--
SQL:
 select dqa1+1, dqa2+2 from (select count(distinct a) over(partition by a), sum(distinct a) over(partition by b)  from t) as foo(dqa1,dqa2);
-->
  <dxl:Thread Id="0">
    <dxl:OptimizerConfig>
      <dxl:EnumeratorConfig Id="0" PlanSamples="0" CostThreshold="0"/>
      <dxl:StatisticsConfig DampingFactorFilter="0.750000" DampingFactorJoin="0.010000" DampingFactorGroupBy="0.750000" MaxStatsBuckets="100"/>
      <dxl:CTEConfig CTEInliningCutoff="0"/> 
      <dxl:WindowOids RowNumber="7000" Rank="7001"/>
      <dxl:CostModelConfig CostModelType="1" SegmentsForCosting="2">
        <dxl:CostParams>
          <dxl:CostParam Name="NLJFactor" Value="1.000000" LowerBound="0.500000" UpperBound="1.500000"/>
        </dxl:CostParams>
      </dxl:CostModelConfig>
      <dxl:TraceFlags Value="102120,103001,103014,103015,105000"/>
    </dxl:OptimizerConfig>
    <dxl:Metadata SystemIds="0.GPDB">
    </dxl:Metadata>
    <dxl:Query>
      <dxl:OutputColumns>
        <dxl:Ident ColId="13" ColName="?column?" TypeMdid="0.20.1.0"/>
        <dxl:Ident ColId="14" ColName="?column?" TypeMdid="0.20.1.0"/>
      </dxl:OutputColumns>
      <dxl:CTEList/>
      <dxl:LogicalProject>
        <dxl:ProjList>
          <dxl:ProjElem ColId="13" Alias="?column?">
            <dxl:OpExpr OperatorName="+" OperatorMdid="0.688.1.0" OperatorType="0.20.1.0">
              <dxl:Ident ColId="11" ColName="count" TypeMdid="0.20.1.0"/>
              <dxl:ConstValue TypeMdid="0.23.1.0" Value="1"/>
            </dxl:OpExpr>
          </dxl:ProjElem>
          <dxl:ProjElem ColId="14" Alias="?column?">
            <dxl:OpExpr OperatorName="+" OperatorMdid="0.688.1.0" OperatorType="0.20.1.0">
              <dxl:Ident ColId="12" ColName="sum" TypeMdid="0.20.1.0"/>
              <dxl:ConstValue TypeMdid="0.23.1.0" Value="2"/>
            </dxl:OpExpr>
          </dxl:ProjElem>
        </dxl:ProjList>
        <dxl:LogicalWindow>
          <dxl:WindowSpecList>
            <dxl:WindowSpec PartitionColumns="1"/>
            <dxl:WindowSpec PartitionColumns="2"/>
          </dxl:WindowSpecList>
          <dxl:ProjList>
            <dxl:ProjElem ColId="11" Alias="count">
              <dxl:WindowFunc Mdid="0.2147.1.0" TypeMdid="0.20.1.0" Distinct="true" WindowStarArg="false" WindowSimpleAgg="false" WindowStrategy="Immediate" WinSpecPos="0">
                <dxl:Ident ColId="1" ColName="a" TypeMdid="0.23.1.0"/>
              </dxl:WindowFunc>
            </dxl:ProjElem>
            <dxl:ProjElem ColId="12" Alias="sum">
              <dxl:WindowFunc Mdid="0.2108.1.0" TypeMdid="0.20.1.0" Distinct="true" WindowStarArg="false" WindowSimpleAgg="false" WindowStrategy="Immediate" WinSpecPos="1">
                <dxl:Ident ColId="1" ColName="a" TypeMdid="0.23.1.0"/>
              </dxl:WindowFunc>
            </dxl:ProjElem>
          </dxl:ProjList>
          <dxl:LogicalGet>
            <dxl:TableDescriptor Mdid="6.19556034.1.1" TableName="t">
              <dxl:Columns>
                <dxl:Column ColId="1" Attno="1" ColName="a" TypeMdid="0.23.1.0"/>
                <dxl:Column ColId="2" Attno="2" ColName="b" TypeMdid="0.23.1.0"/>
                <dxl:Column ColId="3" Attno="3" ColName="d" TypeMdid="0.23.1.0"/>
                <dxl:Column ColId="4" Attno="-1" ColName="ctid" TypeMdid="0.27.1.0"/>
                <dxl:Column ColId="5" Attno="-3" ColName="xmin" TypeMdid="0.28.1.0"/>
                <dxl:Column ColId="6" Attno="-4" ColName="cmin" TypeMdid="0.29.1.0"/>
                <dxl:Column ColId="7" Attno="-5" ColName="xmax" TypeMdid="0.28.1.0"/>
                <dxl:Column ColId="8" Attno="-6" ColName="cmax" TypeMdid="0.29.1.0"/>
                <dxl:Column ColId="9" Attno="-7" ColName="tableoid" TypeMdid="0.26.1.0"/>
                <dxl:Column ColId="10" Attno="-8" ColName="gp_segment_id" TypeMdid="0.23.1.0"/>
              </dxl:Columns>
            </dxl:TableDescriptor>
          </dxl:LogicalGet>
        </dxl:LogicalWindow>
      </dxl:LogicalProject>
    </dxl:Query>
  </dxl:Thread>
</dxl:DXLMessage>
